package com.yoso.base.service;

import com.github.pagehelper.PageInfo;
import com.yoso.base.interfaces.vo.BaseVo;
import com.yoso.base.interfaces.vo.PageVo;

import java.util.List;

public interface IBaseService<V extends BaseVo, M extends BaseEntityExample> {
    long countByExample(M example);

    int deleteByExample(M example);

    int deleteByPrimaryKey(String id);

    int insert(V record);

    int insertSelective(V record);

    List<V> selectByExample(M example);

    V selectByPrimaryKey(String id);

    int updateByExampleSelective(V record, M example);

    int updateByExample(V record, M example);

    int updateByPrimaryKeySelective(V record);

    int updateByPrimaryKey(V record);

    PageInfo<V> pageConditionsList(PageVo pageVo);

    List<V> listAll();

    int saveRecord(V record);

    int updateRecord(V record);
}
